The Border Gateway Protocol (BGP) is a very widely used routing protocol. For the BGP, reference may be made to an RFC 4271 published by the Internet Engineering Task Force (IETF). One BGP speaker may receive multiple route messages that are sent by multiple peers (peer) and that include routes towards a destination. The BGP speaker needs to select, as a preferred route message, one route message from the multiple route messages, so as to generate a route entry towards the destination. In the prior art, corresponding route preference policies need to be respectively configured for the multiple peers. For example, multiple peer priorities may be configured for the multiple peers respectively; or multiple local-preference values may be configured for the multiple peers respectively. In the foregoing technical solution, corresponding route preference policies need to be respectively configured for multiple peers; therefore, a workload is relatively heavy, and implementation is relatively complex.